package top.kaoshanji.p1ch03c;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 代码清单-p1ch03c-92页a：使用@Value注解引入外部配置文件的属性
 * @author kaoshanji
 * ^_^
 * create time 2025/4/23 11:12
 */
@Component
public class BlankDiscValue {

    private String title;
    private String artist;

    public BlankDiscValue() {}

    @Autowired
    public BlankDiscValue(@Value("${disc.title}") String title, @Value("${disc.artist}") String artist) {
        this.title = title;
        this.artist = artist;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getArtist() {
        return artist;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }

}
